﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Learnive.Models;

namespace Learnive.Controllers
{
    public class HomeController : Controller
    {
        MessageBoardContext ProjectDB = new MessageBoardContext();
        LearniveContext db = new LearniveContext();

        [Authorize]
        public ActionResult Index()
        {
            HomeViewModel hvm = new HomeViewModel();
            hvm.MessageBoards = ProjectDB.MessageBoards.ToList();
            hvm.Vakjes = db.Vakjes.ToList();
            hvm.Huiswerken = db.Huiswerks.ToList();
            hvm.Cijfers = db.Cijfers.ToList();
            hvm.Webmails = db.Webmails.ToList();
            hvm.Leerdoelen = db.Leerdoels.ToList();

            return View(hvm);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }

        public ActionResult Agenda()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
